﻿<UserControl x:Class="HSE.Common.PictureAttachmentShow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.Resources>
        <DataTemplate x:Key="ItemTemplate">
            <StackPanel Orientation="Vertical">
                <Image Source="{Binding Icon}" HorizontalAlignment="Center" Width="260" Height="200" Margin="0">
                    <i:Interaction.Behaviors>
                        <ei:FluidMoveSetTagBehavior Tag="DataContext"/>
                    </i:Interaction.Behaviors>
                </Image>
                <TextBlock Text="{Binding TipInfo}" HorizontalAlignment="Center" VerticalAlignment="Top" d:LayoutOverrides="Width" Margin="0,5,0,0" Foreground="#FF857474" FontFamily="Segoe UI" FontSize="14.667"/>
            </StackPanel>
        </DataTemplate>

        <ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
            <StackPanel  Orientation="Vertical"  Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
                
            </StackPanel>
        </ItemsPanelTemplate>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition Width="auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <TextBlock Margin="20,0,0,0" Grid.Row="0" VerticalAlignment="Top" Text="{Binding Title}" FontSize="29.333" FontFamily="/HSE;component/Fonts/Fonts.zip#FZCuQian-M17S" Foreground="#FF857474" HorizontalAlignment="Left" d:LayoutOverrides="HorizontalAlignment, GridBox"/>

            <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="1" Grid.Column="0" DataContext="{Binding SelectedItem, ElementName=listBox}" d:DataContext="{Binding Photos[0]}">
                <i:Interaction.Behaviors>
                    <ei:FluidMoveBehavior InitialTag="DataContext" Duration="0:0:0.6" FloatAbove="False">
                        <ei:FluidMoveBehavior.EaseY>
                            <CubicEase EasingMode="EaseIn"/>
                        </ei:FluidMoveBehavior.EaseY>
                        <ei:FluidMoveBehavior.EaseX>
                            <CubicEase EasingMode="EaseIn"/>
                        </ei:FluidMoveBehavior.EaseX>
                    </ei:FluidMoveBehavior>
                </i:Interaction.Behaviors>
                <Image Source="{Binding Icon}" Width="600" Height="450" Margin="10"/>
                <TextBlock Text="{Binding TipInfo}" HorizontalAlignment="Center" VerticalAlignment="Bottom" Foreground="#FF857474" FontFamily="Segoe UI" FontSize="18.667"/>
            </StackPanel>


        <ListBox x:Name="listBox" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" ItemTemplate="{StaticResource ItemTemplate}" ItemsPanel="{StaticResource ItemsPanelTemplate1}" SelectedItem="{Binding Photos[0]}" ItemsSource="{Binding Photos}" Width="300" Foreground="#FFF0F0F0" Background="{x:Null}" BorderBrush="{x:Null}"/>
        
    </Grid>
</UserControl>